import request from '@/utils/request'

// 查询探活列表
export function listDetect(query) {
  return request({
    url: '/ipmanagement/detect/list',
    method: 'get',
    params: query
  })
}

// 查询探活详细
export function getDetect(id) {
  return request({
    url: '/ipmanagement/detect/' + id,
    method: 'get'
  })
}

// 新增探活
export function addDetect(data) {
  return request({
    url: '/ipmanagement/detect',
    method: 'post',
    data: data
  })
}

// 修改探活
export function updateDetect(data) {
  return request({
    url: '/ipmanagement/detect',
    method: 'put',
    data: data
  })
}

// 删除探活
export function delDetect(id) {
  return request({
    url: '/ipmanagement/detect/' + id,
    method: 'delete'
  })
}

// 空闲ip列表
export function listKongxianDetect(id, query) {
  return request({
    url: '/ipmanagement/detect/kongxianip/' + id,
    method: 'get',
    params: query
  })
}

// 实占ip列表
export function listShizhanDetect(id, query) {
  return request({
    url: '/ipmanagement/detect/shizhanip/' + id,
    method: 'get',
    params: query
  })
}